import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
    // Vue.use(require('vue-wechat-title'))

export default new Router({
        scrollBehavior(to, from, savedPosition) {
            return { x: 0, y: 0 }
        },
        routes: [{
                path: '/',
                name: 'index',
                meta: {
                    title: '首页'
                },
                component: function(resolve) {
                    require(["../components/index/index.vue"], resolve);
                }
            },
            {
                path: '/index',
                name: 'index',
                meta: {
                    title: '首页'
                },
                component: function(resolve) {
                    require(["../components/index/index.vue"], resolve);
                }
            },
            {
                path: '/message',
                name: 'message',
                meta: {
                    title: '消息'
                },
                component: function(resolve) {
                    require(["../components/mine/message.vue"], resolve);
                }
            },
            {
                path: '/messagedetail',
                name: 'messagedetail',
                meta: {
                    title: '消息详情'
                },
                component: function(resolve) {
                    require(["../components/mine/messagedetail.vue"], resolve);
                }
            },
            {
                path: '/xieyi',
                name: 'xieyi',
                meta: {
                    title: '平台服务协议条款'
                },
                component: function(resolve) {
                    require(["../components/mine/xieyi.vue"], resolve);
                }
            },
            {
                path: '/car',
                name: 'car',
                meta: {
                    title: '购物车'
                },
                component: function(resolve) {
                    require(["../components/car/car.vue"], resolve);
                }
            },
            {
                path: '/search',
                name: 'search',
                meta: {
                    title: '搜索'
                },
                component: function(resolve) {
                    require(["../components/index/search.vue"], resolve);
                }
            },
            {
                path: '/disease-query',
                name: 'disease-query',
                meta: {
                    title: '疾病查询'
                },
                component: function(resolve) {
                    require(["../components/index/disease-query.vue"], resolve);
                }
            },
            {
                path: '/daigoufuwu',
                name: 'daigoufuwu',
                meta: {
                    title: '代购服务'
                },
                component: function(resolve) {
                    require(["../components/index/daigoufuwu.vue"], resolve);
                }
            },
            // {
            //     path: '/pathology-query',
            //     name: 'pathology-query',
            //     meta: {
            //         title: '药理查询'
            //     },
            //     component: function(resolve) {
            //         require(["../components/index/pathology-query.vue"], resolve);
            //     }
            // },
            // {
            //     path: '/pathology-query-list',
            //     name: 'pathology-query-list',
            //     meta: {
            //         title: '药理查询'
            //     },
            //     component: function(resolve) {
            //         require(["../components/index/pathology-query-list.vue"], resolve);
            //     }
            // },
            // {
            //     path: '/pathology-query-details',
            //     name: 'pathology-query-details',
            //     meta: {
            //         title: '详情'
            //     },
            //     component: function(resolve) {
            //         require(["../components/index/pathology-query-details.vue"], resolve);
            //     }
            // },
            {
                path: '/yaoli-search',
                name: 'yaoli-search',
                meta: {
                    title: '药理搜索'
                },
                component: function(resolve) {
                    require(["../components/index/yaoli-search.vue"], resolve);
                }
            },
            {
                path: '/login',
                name: 'login',
                meta: {
                    title: '登录'
                },
                component: function(resolve) {
                    require(["../components/login.vue"], resolve);
                }
            },
            {
                path: '/enroll',
                name: 'enroll',
                meta: {
                    title: '注册'
                },
                component: function(resolve) {
                    require(["../components/enroll.vue"], resolve);
                }
            },
            {
                path: '/details',
                name: 'details',
                meta: {
                    title: '详情'
                },
                component: function(resolve) {
                    require(["../components/index/details.vue"], resolve);
                }
            },
            {
                path: '/order-details',
                name: 'order-details',
                meta: {
                    title: '订单详情'
                },
                component: function(resolve) {
                    require(["../components/index/order-details.vue"], resolve);
                }
            },
            {
                path: '/comment-list',
                name: 'comment-list',
                meta: {
                    title: '评价列表'
                },
                component: function(resolve) {
                    require(["../components/index/comment-list.vue"], resolve);
                }
            },
            {
                path: '/fendian',
                name: 'fendian',
                meta: {
                    title: '分店分布'
                },
                component: function(resolve) {
                    require(["../components/index/fendian.vue"], resolve);
                }
            },
            {
                path: '/gojiesuan',
                name: 'gojiesuan',
                meta: {
                    title: '详情'
                },
                component: function(resolve) {
                    require(["../components/index/gojiesuan.vue"], resolve);
                }
            },
            {
                path: '/submit',
                name: 'submit',
                meta: {
                    title: '提交成功'
                },
                component: function(resolve) {
                    require(["../components/index/submit.vue"], resolve);
                }
            },
            {
                path: '/health-tips',
                name: 'health-tips',
                meta: {
                    title: '健康小常识'
                },
                component: function(resolve) {
                    require(["../components/index/health-tips.vue"], resolve);
                }
            },
            {
                path: '/health-details',
                name: 'health-details',
                meta: {
                    title: '详情'
                },
                component: function(resolve) {
                    require(["../components/index/health-details.vue"], resolve);
                }
            },
            {
                path: '/look-medicine',
                name: 'look-medicine',
                meta: {
                    title: '药品查询'
                },
                component: function(resolve) {
                    require(["../components/index/look-medicine.vue"], resolve);
                }
            },
            {
                path: '/look-medicine-list',
                name: 'look-medicine-list',
                meta: {
                    title: '药品查询'
                },
                component: function(resolve) {
                    require(["../components/index/look-medicine-list.vue"], resolve);
                }
            },
            {
                path: '/look-medicine-details',
                name: 'look-medicine-details',
                meta: {
                    title: '详情'
                },
                component: function(resolve) {
                    require(["../components/index/look-medicine-details.vue"], resolve);
                }
            },
            {
                path: '/yaopin-search',
                name: 'yaopin-search',
                meta: {
                    title: '搜索'
                },
                component: function(resolve) {
                    require(["../components/index/yaopin-search.vue"], resolve);
                }
            },
            {
                path: '/bingzheng-jieshao',
                name: 'bingzheng-jieshao',
                meta: {
                    title: ''
                },
                component: function(resolve) {
                    require(["../components/index/bingzheng-jieshao.vue"], resolve);
                }
            },
            {
                path: '/free-trial',
                name: 'free-trial',
                meta: {
                    title: '免费试用'
                },
                component: function(resolve) {
                    require(["../components/index/free-trial.vue"], resolve);
                }
            },
            {
                path: '/sex',
                name: 'sex',
                meta: {
                    title: '男性'
                },
                component: function(resolve) {
                    require(["../components/index/sex.vue"], resolve);
                }
            },
            {
                path: '/classify',
                name: 'classify',
                meta: {
                    title: '药品分类'
                },
                component: function(resolve) {
                    require(["../components/classify/classify.vue"], resolve);
                }
            },
            {
                path: '/classify-list',
                name: 'classify-list',
                meta: {
                    title: '药品'
                },
                component: function(resolve) {
                    require(["../components/classify/classify-list.vue"], resolve);
                }
            },
            {
                path: '/brand-street',
                name: 'brand-street',
                meta: {
                    title: '品牌专区'
                },
                component: function(resolve) {
                    require(["../components/brand-street/brand-street.vue"], resolve);
                }
            },
            {
                path: '/brand-street-details',
                name: 'brand-street-details',
                meta: {
                    title: '详情'
                },
                component: function(resolve) {
                    require(["../components/brand-street/brand-street-details.vue"], resolve);
                }
            },
            {
                path: '/mine',
                name: 'mine',
                meta: {
                    title: '我的'
                },
                component: function(resolve) {
                    require(["../components/mine/mine.vue"], resolve);
                }
            },
            {
                path: '/about',
                name: 'about',
                meta: {
                    title: '关于天健'
                },
                component: function(resolve) {
                    require(["../components/mine/about.vue"], resolve);
                }
            },
            {
                path: '/personal-data',
                name: 'personal-data',
                meta: {
                    title: '个人资料'
                },
                component: function(resolve) {
                    require(["../components/mine/personal-data.vue"], resolve);
                }
            },
            {
                path: '/install',
                name: 'install',
                meta: {
                    title: '设置'
                },
                component: function(resolve) {
                    require(["../components/mine/install.vue"], resolve);
                }
            },
            {
                path: '/collect',
                name: 'collect',
                meta: {
                    title: '我的收藏'
                },
                component: function(resolve) {
                    require(["../components/mine/collect.vue"], resolve);
                }
            },
            {
                path: '/my-card',
                name: 'my-card',
                meta: {
                    title: '我的卡包'
                },
                component: function(resolve) {
                    require(["../components/mine/my-card.vue"], resolve);
                }
            },
            {
                path: '/my-red',
                name: 'my-red',
                meta: {
                    title: '我的红包'
                },
                component: function(resolve) {
                    require(["../components/mine/my-red.vue"], resolve);
                }
            },
            {
                path: '/address',
                name: 'address',
                meta: {
                    title: '收货地址'
                },
                component: function(resolve) {
                    require(["../components/mine/address.vue"], resolve);
                }
            },
            {
                path: '/my-integral',
                name: 'my-integral',
                meta: {
                    title: '我的积分'
                },
                component: function(resolve) {
                    require(["../components/mine/my-integral.vue"], resolve);
                }
            },
            {
                path: '/xin-address',
                name: 'xin-address',
                meta: {
                    title: '收货地址'
                },
                component: function(resolve) {
                    require(["../components/mine/xin-address.vue"], resolve);
                }
            },
            {
                path: '/my-order',
                name: 'my-order',
                meta: {
                    title: '我的订单'
                },
                component: function(resolve) {
                    require(["../components/mine/my-order.vue"], resolve);
                }
            },
            {
                path: '/pinglun',
                name: 'pinglun',
                meta: {
                    title: '我的评论'
                },
                component: function(resolve) {
                    require(["../components/mine/pinglun.vue"], resolve);
                }
            },
            {
                path: '/gopingjia',
                name: 'gopingjia',
                meta: {
                    title: '评价'
                },
                component: function(resolve) {
                    require(["../components/mine/gopingjia.vue"], resolve);
                }
            },
            {
                path: '/jibing-search',
                name: 'jibing-search',
                meta: {
                    title: '疾病搜索'
                },
                component: function(resolve) {
                    require(["../components/index/jibing-search.vue"], resolve);
                }
            },
            {
                path: '/editaddress',
                name: 'editaddress',
                meta: {
                    title: '编辑地址'
                },
                component: function(resolve) {
                    require(["../components/mine/editaddress.vue"], resolve);
                }
            },
            {
                path: '/selectaddress',
                name: 'selectaddress',
                meta: {
                    title: '选择地址'
                },
                component: function(resolve) {
                    require(["../components/mine/selectaddress.vue"], resolve);
                }
            },
            {
                path: '/jifenjiesuan',
                name: 'jifenjiesuan',
                meta: {
                    title: '详情'
                },
                component: function(resolve) {
                    require(["../components/mine/jifenjiesuan.vue"], resolve);
                }
            },
        ]
    })
    //     routes: [ ]
    // })